#include<unistd.h>
#include<sys/ipc.h>
#include<sys/shm.h>
#include<stdlib.h>
#include<stdio.h>
#include<string.h>
#include<sys/types.h>
#include<signal.h>

typedef struct mymem{
    int id;
    char name[10];
    int age;
}mymem;

mymem* mems;
int main()
{
    int identify = shmget(0x5005, sizeof(mymem)*10,  0644 | IPC_CREAT);
    mems = (mymem *)shmat(identify, NULL, 0); 
    for(int i = 0; i<10; i++){
        printf("id: %d, name: %s, age: %d\n", mems[i].id, mems[i].name, mems[i].age);
    }     
    while(1);
}